
package com.mu.rai.services;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;


/**
 * <p>Java class for ipv4Header complex type.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * 
 * <pre>
 * &lt;complexType name="ipv4Header">
 *   &lt;complexContent>
 *     &lt;extension base="{http://services.rai.mu.com}ipHeader">
 *       &lt;sequence>
 *         &lt;element name="dst_ipv4" type="{http://services.rai.mu.com}ipv4DstAddress"/>
 *         &lt;element name="flags" type="{http://services.rai.mu.com}ipFlags"/>
 *         &lt;element name="header_length" type="{http://services.rai.mu.com}lengthType"/>
 *         &lt;element name="identifier" type="{http://services.rai.mu.com}ipv4Identifier"/>
 *         &lt;element name="ip_options" minOccurs="0">
 *           &lt;complexType>
 *             &lt;complexContent>
 *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *                 &lt;sequence>
 *                   &lt;element name="router_alert" type="{http://services.rai.mu.com}routerAlert" maxOccurs="unbounded" minOccurs="0"/>
 *                 &lt;/sequence>
 *               &lt;/restriction>
 *             &lt;/complexContent>
 *           &lt;/complexType>
 *         &lt;/element>
 *         &lt;element name="length" type="{http://services.rai.mu.com}lengthType"/>
 *         &lt;element name="offset" type="{http://services.rai.mu.com}ipv4Offset"/>
 *         &lt;element name="src_ipv4" type="{http://services.rai.mu.com}ipv4SrcAddress"/>
 *         &lt;element name="tos" type="{http://services.rai.mu.com}ipv4Tos"/>
 *         &lt;element name="ttl" type="{http://services.rai.mu.com}ipv4Ttl"/>
 *       &lt;/sequence>
 *     &lt;/extension>
 *   &lt;/complexContent>
 * &lt;/complexType>
 * </pre>
 * 
 * 
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ipv4Header", propOrder = {
    "dstIpv4",
    "flags",
    "headerLength",
    "identifier",
    "ipOptions",
    "length",
    "offset",
    "srcIpv4",
    "tos",
    "ttl"
})
public class Ipv4Header
    extends IpHeader
{

    @XmlElement(name = "dst_ipv4", required = true)
    protected Ipv4DstAddress dstIpv4;
    @XmlElement(required = true)
    protected IpFlags flags;
    @XmlElement(name = "header_length", required = true)
    protected LengthType headerLength;
    @XmlElement(required = true)
    protected Ipv4Identifier identifier;
    @XmlElement(name = "ip_options")
    protected Ipv4Header.IpOptions ipOptions;
    @XmlElement(required = true)
    protected LengthType length;
    @XmlElement(required = true)
    protected Ipv4Offset offset;
    @XmlElement(name = "src_ipv4", required = true)
    protected Ipv4SrcAddress srcIpv4;
    @XmlElement(required = true)
    protected Ipv4Tos tos;
    @XmlElement(required = true)
    protected Ipv4Ttl ttl;

    /**
     * Gets the value of the dstIpv4 property.
     * 
     * @return
     *     possible object is
     *     {@link Ipv4DstAddress }
     *     
     */
    public Ipv4DstAddress getDstIpv4() {
        return dstIpv4;
    }

    /**
     * Sets the value of the dstIpv4 property.
     * 
     * @param value
     *     allowed object is
     *     {@link Ipv4DstAddress }
     *     
     */
    public void setDstIpv4(Ipv4DstAddress value) {
        this.dstIpv4 = value;
    }

    /**
     * Gets the value of the flags property.
     * 
     * @return
     *     possible object is
     *     {@link IpFlags }
     *     
     */
    public IpFlags getFlags() {
        return flags;
    }

    /**
     * Sets the value of the flags property.
     * 
     * @param value
     *     allowed object is
     *     {@link IpFlags }
     *     
     */
    public void setFlags(IpFlags value) {
        this.flags = value;
    }

    /**
     * Gets the value of the headerLength property.
     * 
     * @return
     *     possible object is
     *     {@link LengthType }
     *     
     */
    public LengthType getHeaderLength() {
        return headerLength;
    }

    /**
     * Sets the value of the headerLength property.
     * 
     * @param value
     *     allowed object is
     *     {@link LengthType }
     *     
     */
    public void setHeaderLength(LengthType value) {
        this.headerLength = value;
    }

    /**
     * Gets the value of the identifier property.
     * 
     * @return
     *     possible object is
     *     {@link Ipv4Identifier }
     *     
     */
    public Ipv4Identifier getIdentifier() {
        return identifier;
    }

    /**
     * Sets the value of the identifier property.
     * 
     * @param value
     *     allowed object is
     *     {@link Ipv4Identifier }
     *     
     */
    public void setIdentifier(Ipv4Identifier value) {
        this.identifier = value;
    }

    /**
     * Gets the value of the ipOptions property.
     * 
     * @return
     *     possible object is
     *     {@link Ipv4Header.IpOptions }
     *     
     */
    public Ipv4Header.IpOptions getIpOptions() {
        return ipOptions;
    }

    /**
     * Sets the value of the ipOptions property.
     * 
     * @param value
     *     allowed object is
     *     {@link Ipv4Header.IpOptions }
     *     
     */
    public void setIpOptions(Ipv4Header.IpOptions value) {
        this.ipOptions = value;
    }

    /**
     * Gets the value of the length property.
     * 
     * @return
     *     possible object is
     *     {@link LengthType }
     *     
     */
    public LengthType getLength() {
        return length;
    }

    /**
     * Sets the value of the length property.
     * 
     * @param value
     *     allowed object is
     *     {@link LengthType }
     *     
     */
    public void setLength(LengthType value) {
        this.length = value;
    }

    /**
     * Gets the value of the offset property.
     * 
     * @return
     *     possible object is
     *     {@link Ipv4Offset }
     *     
     */
    public Ipv4Offset getOffset() {
        return offset;
    }

    /**
     * Sets the value of the offset property.
     * 
     * @param value
     *     allowed object is
     *     {@link Ipv4Offset }
     *     
     */
    public void setOffset(Ipv4Offset value) {
        this.offset = value;
    }

    /**
     * Gets the value of the srcIpv4 property.
     * 
     * @return
     *     possible object is
     *     {@link Ipv4SrcAddress }
     *     
     */
    public Ipv4SrcAddress getSrcIpv4() {
        return srcIpv4;
    }

    /**
     * Sets the value of the srcIpv4 property.
     * 
     * @param value
     *     allowed object is
     *     {@link Ipv4SrcAddress }
     *     
     */
    public void setSrcIpv4(Ipv4SrcAddress value) {
        this.srcIpv4 = value;
    }

    /**
     * Gets the value of the tos property.
     * 
     * @return
     *     possible object is
     *     {@link Ipv4Tos }
     *     
     */
    public Ipv4Tos getTos() {
        return tos;
    }

    /**
     * Sets the value of the tos property.
     * 
     * @param value
     *     allowed object is
     *     {@link Ipv4Tos }
     *     
     */
    public void setTos(Ipv4Tos value) {
        this.tos = value;
    }

    /**
     * Gets the value of the ttl property.
     * 
     * @return
     *     possible object is
     *     {@link Ipv4Ttl }
     *     
     */
    public Ipv4Ttl getTtl() {
        return ttl;
    }

    /**
     * Sets the value of the ttl property.
     * 
     * @param value
     *     allowed object is
     *     {@link Ipv4Ttl }
     *     
     */
    public void setTtl(Ipv4Ttl value) {
        this.ttl = value;
    }


    /**
     * <p>Java class for anonymous complex type.
     * 
     * <p>The following schema fragment specifies the expected content contained within this class.
     * 
     * <pre>
     * &lt;complexType>
     *   &lt;complexContent>
     *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
     *       &lt;sequence>
     *         &lt;element name="router_alert" type="{http://services.rai.mu.com}routerAlert" maxOccurs="unbounded" minOccurs="0"/>
     *       &lt;/sequence>
     *     &lt;/restriction>
     *   &lt;/complexContent>
     * &lt;/complexType>
     * </pre>
     * 
     * 
     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "routerAlert"
    })
    public static class IpOptions {

        @XmlElement(name = "router_alert", nillable = true)
        protected List<RouterAlert> routerAlert;

        /**
         * Gets the value of the routerAlert property.
         * 
         * <p>
         * This accessor method returns a reference to the live list,
         * not a snapshot. Therefore any modification you make to the
         * returned list will be present inside the JAXB object.
         * This is why there is not a <CODE>set</CODE> method for the routerAlert property.
         * 
         * <p>
         * For example, to add a new item, do as follows:
         * <pre>
         *    getRouterAlert().add(newItem);
         * </pre>
         * 
         * 
         * <p>
         * Objects of the following type(s) are allowed in the list
         * {@link RouterAlert }
         * 
         * 
         */
        public List<RouterAlert> getRouterAlert() {
            if (routerAlert == null) {
                routerAlert = new ArrayList<RouterAlert>();
            }
            return this.routerAlert;
        }

    }

}
